﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OnlineManagement.Common;
using System.IO;
namespace OnlineManagement.Web.Account
{
    public partial class Auth : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Random r = new Random();
                int index = r.Next(4, 6);
                string code = Common.ValidationCode.MakeCode(index);
                Session["code"] = code;
                using (MemoryStream ms = Common.ValidationCode.CreateCodeImg(code))
                {
                    Response.BinaryWrite(ms.ToArray());
                }
            }

        }
    }
}